package com.cskaoyan.day13;

public class TestInner {
    public static void main(String[] args) {
        Car car = new Car("比亚迪", 15D, "秦PLUS");
        car.startEngine();
    }
}

class Car {
    String brand;
    Double price;
    String model;

    public Car(String brand, Double price, String model) {
        this.brand = brand;
        this.price = price;
        this.model = model;
    }

    public void startEngine() {
        Engine engine = new Engine();
        engine.run();
    }

    class Engine {

        public void run() {
            System.out.println("汽车:" + brand + ", 型号： " + model + " , 价格为: " + price);
            System.out.println("发动机已启动!!!!!!!!!!!!!!!!!!!!!!");
        }
    }
}
